package com.spi.soconversion.orders.conversion;

public enum DeliveryMethod {
	CARRY("000001_Customer_P_CARRY","PICK"),
	DCPICK("000001_Customer_P_HBCDCPU","PICK"),
	STOREPU("000001_Customer_P_STOREPU", "PICK"),
	GND("000001_Home Deliv_T_GND", "DEL"),
    STORESTOCK("000001_Home Deliv_T_STORESTOCK", "DEL");

	private String code;
	private String displayText;
			
	private DeliveryMethod(String code, String displayText) {
		this.code= code;
		this.displayText=displayText;
	}
	
	/**
	 * Get the delivery method
	 * @param cofiValue
	 * @return
	 */
	public static String getDeliveryMethod(String cofiValue) {
		for (DeliveryMethod dm : DeliveryMethod.values()) {
			if (dm.code.equals(cofiValue)) {
				return dm.displayText;
			}
		}
		return null;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getDisplayText() {
		return displayText;
	}

	public void setDisplayText(String displayText) {
		this.displayText = displayText;
	}
}
